/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.bayu.services.entity;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author Bayu
 */
@Entity
@Table(name = "listrik")
@NamedQueries({@NamedQuery(name = "Listrik.findAll", query = "SELECT l FROM Listrik l"), @NamedQuery(name = "Listrik.findById", query = "SELECT l FROM Listrik l WHERE l.id = :id"), @NamedQuery(name = "Listrik.findByKwh", query = "SELECT l FROM Listrik l WHERE l.kwh = :kwh"), @NamedQuery(name = "Listrik.findByRpkwh", query = "SELECT l FROM Listrik l WHERE l.rpkwh = :rpkwh"), @NamedQuery(name = "Listrik.findByBulan", query = "SELECT l FROM Listrik l WHERE l.bulan = :bulan")})
public class Listrik implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Long id;
    @Basic(optional = false)
    @Column(name = "kwh")
    private double kwh;
    @Basic(optional = false)
    @Column(name = "rpkwh")
    private double rpkwh;
    @Basic()
    @Column(name = "bulan")
    @Temporal(TemporalType.DATE)
    private Date bulan;
    @Basic()
    @Lob
    @Column(name = "noteenglish")
    private String noteenglish;
    @Basic()
    @Lob
    @Column(name = "notejapan")
    private String notejapan;

    public Listrik() {
    }

    public Listrik(Long id) {
        this.id = id;
    }

    public Listrik(Long id, double kwh, double rpkwh, Date bulan, String noteenglish, String notejapan) {
        this.id = id;
        this.kwh = kwh;
        this.rpkwh = rpkwh;
        this.bulan = bulan;
        this.noteenglish = noteenglish;
        this.notejapan = notejapan;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public double getKwh() {
        return kwh;
    }

    public void setKwh(double kwh) {
        this.kwh = kwh;
    }

    public double getRpkwh() {
        return rpkwh;
    }

    public void setRpkwh(double rpkwh) {
        this.rpkwh = rpkwh;
    }

    public Date getBulan() {
        return bulan;
    }

    public void setBulan(Date bulan) {
        this.bulan = bulan;
    }

    public String getNoteenglish() {
        return noteenglish;
    }

    public void setNoteenglish(String noteenglish) {
        this.noteenglish = noteenglish;
    }

    public String getNotejapan() {
        return notejapan;
    }

    public void setNotejapan(String notejapan) {
        this.notejapan = notejapan;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Listrik)) {
            return false;
        }
        Listrik other = (Listrik) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.bayu.services.entity.Listrik[id=" + id + "]";
    }

}
